package old;
//PassObject.java
class Number1
{
	int i;
}

public class PassObject
{
	public static void main(String[] args)
	{
		Number1 n=new Number1();
		int x=10;
		n.i=0;
		System.out.println("before n.i="+n.i+"\tx="+x);
		f(n,x);
		System.out.println("after n.i="+n.i+"\tx="+x);

	}
	static void f(Number1 num,int y)
	{
		while(y>0)
		{
			num.i+=y;
			y--;

		}
		System.out.println("close num.i="+num.i+"\ty="+y);
	}

}